package com.daniel.gof.responsibility;

/**
 * 详细说明
 *
 * @author Daniel
 * @version V1.0
 * @date 2020/11/19 11:39
 */
public class DepartApprover extends Approver {
    public DepartApprover(String name) {
        super(name);
    }

    @Override
    public void process(PurchaseRequest request) {
        if (request.getPrice() <= 5000) {
            System.out.println(" 请求编号 id= " + request.getId() + " 被 " + this.name + " 处理");
        } else {
            approver.process(request);
        }
    }
}
